//
//  StatisticsLayer.h
//  ATM Killer
//
//  Created by Cloner Team on 10/6/14.
//
//

#ifndef STATISTICS_LAYER_H
#define STATISTICS_LAYER_H

#include "AbstractLayer.h"
using namespace extension;
class StatisticsLayer : public AbstractLayer{
    UG_PROPERTY_GETTER(GameModel*, gameModel, GameModel);
    UG_PROPERTY_FULL(Layer*, boardLayer, BoardLayer);
    UG_PROPERTY_FULL(Layer*, generalLayer, GeneralLayer);
    UG_PROPERTY_FULL(Layer*, characterLayer, CharacterLayer);
    UG_PROPERTY_FULL(__Dictionary*, charactersDict, CharactersDict);
    UG_PROPERTY_FULL(int, typeInfo, TypeInfo);
    UG_PROPERTY_FULL(__Dictionary*, avatarDict, AvatarDict);
    UG_PROPERTY_FULL(MenuItemSprite*, facebookButton, FacebookButton);
private:
    UGLayerColor* grayLayer;
    Face* boardFace;
    ScrollView* characterContentView;
    virtual void onEnter();
    virtual void onExit();
    void onButtonClick(Ref* sender);
    void touchesRegister();
    void onTouchesBegan(const std::vector<Touch*>& touches, Event* event);
    void onTouchesMoved(const std::vector<Touch*>& touches, Event* event);
    void onTouchesEnded(const std::vector<Touch*>& touches, Event* event);

    void initialize();
    void createLayers();
    void createLayersContent();
    
    void onCloseStatsBoard(Ref* sender);
public:
    StatisticsLayer();
    ~StatisticsLayer();
    virtual void update (float dt);
    CREATE_FUNC(StatisticsLayer);
};

#endif /* defined(__ATM_Killer__StatisticsLayer__) */
